// 配置路由
import {
  createRouter,
  createWebHashHistory
} from 'vue-router'

import Index from '@/components/index.vue'
import Login from '@/components/login.vue'
import Register from '@/components/register.vue'
import Search from '@/components/search.vue'
import ProductInfo from '@/components/productInfo.vue'
import Data from '@/components/data.vue'
import Monitor from '@/components/monitor.vue'

const routes = [
  {
    path: '/',
    component: Index
  },
  {
    path: '/login',
    component: Login
  },
  {
    path: '/register',
    component: Register
  },
  {
    path: '/search',
    component: Search
  },
  {
    path: '/productInfo',
    component: ProductInfo
  },
  {
    path: '/data',
    component: Data
  },
  {
    path: '/monitor',
    component: Monitor
  }
]

const router = createRouter({
  history: createWebHashHistory(),
  routes
})

export default router